From 1dc171610812257fff8a46f1cd89fadabec9aaa7 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Fri, 17 Feb 2006 14:57:19 -0700 Subject: [PATCH] [IA64] different type of argument in vcpu_set_gr() Fix Reserved Register/Field fault in sal_emulate(). This bug is occurred by a wrong type argument. Signed-off-by: Akio Takebe --- xen/arch/ia64/xen/vcpu.c | 8 ++++---- xen/include/asm-ia64/vcpu.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/ia64/xen/vcpu.c b/xen/arch/ia64/xen/vcpu.c index 4e56524dd9..a15b09981a 100644 --- a/xen/arch/ia64/xen/vcpu.c +++ b/xen/arch/ia64/xen/vcpu.c @@ -81,7 +81,7 @@ unsigned long vcpu_verbose = 0; **************************************************************************/ #ifdef XEN UINT64 -vcpu_get_gr(VCPU *vcpu, unsigned reg) +vcpu_get_gr(VCPU *vcpu, unsigned long reg) { REGS *regs = vcpu_regs(vcpu); UINT64 val; @@ -90,7 +90,7 @@ vcpu_get_gr(VCPU *vcpu, unsigned reg) return val; } IA64FAULT -vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val) +vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val) { REGS *regs = vcpu_regs(vcpu); int nat; @@ -104,7 +104,7 @@ vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val) // IA64_ILLOP_FAULT if the register would cause an Illegal Operation fault // IA64_NO_FAULT otherwise IA64FAULT -vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat) +vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat) { REGS *regs = vcpu_regs(vcpu); if (!reg) return IA64_ILLOP_FAULT; @@ -118,7 +118,7 @@ vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat) // IA64_ILLOP_FAULT if the register would cause an Illegal Operation fault // IA64_NO_FAULT otherwise IA64FAULT -vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value) +vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value) { REGS *regs = vcpu_regs(vcpu); long sof = (regs->cr_ifs) & 0x7f; diff --git a/xen/include/asm-ia64/vcpu.h b/xen/include/asm-ia64/vcpu.h index 812e91cae2..18ec988891 100644 --- a/xen/include/asm-ia64/vcpu.h +++ b/xen/include/asm-ia64/vcpu.h @@ -34,9 +34,9 @@ struct privop_addr_count { #endif /* general registers */ -extern UINT64 vcpu_get_gr(VCPU *vcpu, unsigned reg); -extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val); -extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat); +extern UINT64 vcpu_get_gr(VCPU *vcpu, unsigned long reg); +extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val); +extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat); /* application registers */ extern IA64FAULT vcpu_set_ar(VCPU *vcpu, UINT64 reg, UINT64 val); /* psr */ -- 2.30.2